package ru.ncedu.java.vlku.hrs.uil.cmd;

import ru.ncedu.java.vlku.hrs.bll.HRSManager;
import ru.ncedu.java.vlku.hrs.bll.HRSManagerFactory;
import ru.ncedu.java.vlku.hrs.model.Storage;

public class CreateStorage implements Command {
    // create storage <name> <address>
    @Override
    public void execute(String[] args) {
        if (args.length != 4)
            throw new IllegalArgumentException();
        HRSManager manager = HRSManagerFactory.getInstance().getHRSManager();
        manager.createStorage(new Storage(args[2], args[3]));
    }
}
